package web.dang.zhou.service;

import web.dang.zhou.dao.DAOFactory;
import web.dang.zhou.model.User;

public class UserServiceImp implements UserService{

	@Override
	public void save(User user) throws Exception {
		DAOFactory.getUserDAO().save(user);
		
	}

	@Override
	public User findByEmail(String email) throws Exception {
		return DAOFactory.getUserDAO().findByEmail(email);
	}

	@Override
	public User findById(int id) throws Exception {
		return DAOFactory.getUserDAO().findById(id);
		
	}

	@Override
	public void update(User u) throws Exception {
		DAOFactory.getUserDAO().update(u);
	}
	

}
